/*
 * PngPlus.h
 *
 *  Created on: Feb 4, 2013
 *      Author: baneling
 */

#ifndef PNGPLUS_H_
#define PNGPLUS_H_

#include <png++/image.hpp>
#include "FileTree.h"

using namespace png;
using namespace std;

class PngPlus {
public://methods
	PngPlus(string filename,bool rgb,int height,int width,bool init,bool verbose);
	virtual ~PngPlus();
	void setPixel(int  hY,int wX,double value,int direction);
	void setPixel(int  hY,int wX,double value);
private://methods
	//void changePixel(size_t hY,size_t wX,rgb_pixel pixel);
	void changePixel(size_t hY,size_t wX,rgba_pixel pixel);
	void changePixel(size_t hY,size_t wX,int value);
	rgb_pixel getPixelValue(int direction,size_t intensity);
	rgba_pixel getPixelValueAlpha(int direction,size_t intensity);
	void init();
	void save();
private://attributes
	string filename;
	image<gray_pixel> gray;
	//image<rgb_pixel> rgb;
	image<rgba_pixel> rgba;
	size_t width;
	size_t height;
	bool verbose;
	bool rgbImage;


};

#endif /* PNGPLUS_H_ */
